﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class VVAART
    {

        public void SetUpNewRow(ref DataRow dwReturn)
        {
            switch (app.company)
            {
                case "YGR":
                case "SXN":
                case "TST":
                case "UBT":
                case "AFS":
                default:
                    #region=========
                    dwReturn["VAAMANDANT"] = "00";
                    dwReturn["VAAKOLL"] = "     ";
                    dwReturn["VAAART"] = "                        ";
                    dwReturn["VAAKURZBEZ"] = "     ";
                    dwReturn["VAABEZ"] = "                              ";
                    dwReturn["VAASPERRDAT"] = "0";
                    dwReturn["VAABESTANDF"] = "J";
                    dwReturn["VAAMEBRT"] = "   ";
                    dwReturn["VAABRTFKT"] = "000000000000";
                    dwReturn["VAABRTVON"] = "0";
                    dwReturn["VAABRTBIS"] = "0";
                    dwReturn["VAAMELAE"] = "   ";
                    dwReturn["VAALAEFKT"] = "000000000000";
                    dwReturn["VAALAEVON"] = "0";
                    dwReturn["VAALAEBIS"] = "0";
                    dwReturn["VAAMEHRAP"] = "   ";
                    dwReturn["VAAHRAPVON"] = "0";
                    dwReturn["VAAHRAPBIS"] = "0";
                    dwReturn["VAAMEBRAP"] = "   ";
                    dwReturn["VAABRAPVON"] = "0";
                    dwReturn["VAABRAPBIS"] = "0";
                    dwReturn["VAAMEGEW"] = "   ";
                    dwReturn["VAAGEWGRP"] = " ";
                    dwReturn["VAAGEWFKT"] = "000000000000";
                    dwReturn["VAAGEWVON"] = "0";
                    dwReturn["VAAGEWBIS"] = "0";
                    dwReturn["VAAMENGEH"] = "   ";
                    dwReturn["VAAMEGGRP"] = " ";
                    dwReturn["VAAMEGFKT"] = "000000000000";
                    dwReturn["VAAMEUEB"] = "   ";
                    dwReturn["VAAUEBGRP"] = " ";
                    dwReturn["VAAUEBFKT"] = "000000000000";
                    dwReturn["VAAEAN"] = "0000000000000";
                    dwReturn["VAASTATWNR"] = "            ";
                    dwReturn["VAAZOLLTNR1"] = "                    ";
                    dwReturn["VAAZOLLTNR2"] = "                    ";
                    dwReturn["VAAARTPRGR"] = "   ";
                    dwReturn["VAAPVGRP"] = "   ";
                    dwReturn["VAAAUFART"] = "   ";
                    dwReturn["VAAPACKART"] = "   ";
                    dwReturn["VAAURLAND"] = "   ";
                    dwReturn["VAAWECHSEL"] = " ";
                    dwReturn["VAAURTEXT"] = "         ";
                    dwReturn["VAAREFART"] = "                        ";
                    dwReturn["VAAPART"] = "                    ";
                    dwReturn["VAADKUNDNR"] = "00000000";
                    dwReturn["VAADWERK"] = "   ";
                    dwReturn["VAADABT"] = "   ";
                    dwReturn["VAADART"] = "                    ";
                    dwReturn["VAADVAR"] = "  ";
                    dwReturn["VAAGESANT1"] = "000";
                    dwReturn["VAAGESBEZ1"] = "      ";
                    dwReturn["VAAPOLANT1"] = "000";
                    dwReturn["VAAPOLBEZ1"] = "      ";
                    dwReturn["VAARUECKANT1"] = "000";
                    dwReturn["VAARUECKBEZ1"] = "      ";
                    dwReturn["VAAGESANT2"] = "000";
                    dwReturn["VAAGESBEZ2"] = "      ";
                    dwReturn["VAAPOLANT2"] = "000";
                    dwReturn["VAAPOLBEZ2"] = "      ";
                    dwReturn["VAARUECKANT2"] = "000";
                    dwReturn["VAARUECKBEZ2"] = "      ";
                    dwReturn["VAAGESANT3"] = "000";
                    dwReturn["VAAGESBEZ3"] = "      ";
                    dwReturn["VAAPOLANT3"] = "000";
                    dwReturn["VAAPOLBEZ3"] = "      ";
                    dwReturn["VAARUECKANT3"] = "000";
                    dwReturn["VAARUECKBEZ3"] = "      ";
                    dwReturn["VAAGESANT4"] = "000";
                    dwReturn["VAAGESBEZ4"] = "      ";
                    dwReturn["VAAPOLANT4"] = "000";
                    dwReturn["VAAPOLBEZ4"] = "      ";
                    dwReturn["VAARUECKANT4"] = "000";
                    dwReturn["VAARUECKBEZ4"] = "      ";
                    dwReturn["VAAGESANT5"] = "000";
                    dwReturn["VAAGESBEZ5"] = "      ";
                    dwReturn["VAAPOLANT5"] = "000";
                    dwReturn["VAAPOLBEZ5"] = "      ";
                    dwReturn["VAARUECKANT5"] = "000";
                    dwReturn["VAARUECKBEZ5"] = "      ";
                    dwReturn["VAAGESANT6"] = "000";
                    dwReturn["VAAGESBEZ6"] = "      ";
                    dwReturn["VAAPOLANT6"] = "000";
                    dwReturn["VAAPOLBEZ6"] = "      ";
                    dwReturn["VAARUECKANT6"] = "000";
                    dwReturn["VAARUECKBEZ6"] = "      ";
                    dwReturn["VAAGESANT7"] = "000";
                    dwReturn["VAAGESBEZ7"] = "      ";
                    dwReturn["VAAPOLANT7"] = "000";
                    dwReturn["VAAPOLBEZ7"] = "      ";
                    dwReturn["VAARUECKANT7"] = "000";
                    dwReturn["VAARUECKBEZ7"] = "      ";
                    dwReturn["VAAGESANT8"] = "000";
                    dwReturn["VAAGESBEZ8"] = "      ";
                    dwReturn["VAAPOLANT8"] = "000";
                    dwReturn["VAAPOLBEZ8"] = "      ";
                    dwReturn["VAARUECKANT8"] = "000";
                    dwReturn["VAARUECKBEZ8"] = "      ";
                    dwReturn["VAAHWANT"] = "      ";
                    dwReturn["VAAPOLANTG"] = "0";
                    dwReturn["VAARUEKANTG"] = "0";
                    dwReturn["VAAAENDZL"] = "0";
                    dwReturn["VAAAENDBEN"] = "        ";
                    dwReturn["VAAAENDDAT"] = "0";
                    dwReturn["VAANEUBEN"] = "        ";
                    dwReturn["VAANEUDAT"] = "0";
                    dwReturn["VAAARTST"] = "G";
                    dwReturn["VAAZUREGEL"] = " ";
                    dwReturn["VAAZIELGR"] = "    ";
                    dwReturn["VAAPRGR"] = "K  ";
                    dwReturn["VAAARTGRP"] = "R  ";
                    dwReturn["VAALO"] = "  ";
                    dwReturn["VAABRTCA"] = "N";
                    dwReturn["VAALAECA"] = "N";
                    dwReturn["VAAHRAPCA"] = " ";
                    dwReturn["VAABRAPCA"] = " ";
                    dwReturn["VAAGEWCA"] = "N";
                    dwReturn["VAAPREH"] = "   ";
                    dwReturn["VAAEXCL"] = " ";
                    dwReturn["VAATAX"] = "   ";
                    dwReturn["VAASONDER"] = " ";
                    dwReturn["VAALASCHE"] = " ";
                    dwReturn["VAAFARBKZ"] = " ";
                    dwReturn["VAAWEBLEV"] = "0";
                    dwReturn["VAAARTFAMFL"] = " ";
                    dwReturn["VAAARTFAM"] = "                        ";
                    dwReturn["VAAARTWEB"] = "                        ";
                    dwReturn["VAAWEBSTD"] = " ";
                    dwReturn["VAAARTCOL"] = "          ";
                    dwReturn["VAAARTFIN"] = "          ";
                    dwReturn["VAADIMAM"] = "  ";
                    dwReturn["VAADIMZAM"] = "  ";
                    dwReturn["VAADIMLG"] = "  ";
                    dwReturn["VAAKONFDES"] = " ";
                    dwReturn["VAAKONFRAP"] = " ";
                    dwReturn["VAAKONFCOL"] = " ";
                    dwReturn["VAAKONFLG"] = " ";
                    dwReturn["VAAKONFBRT"] = " ";
                    dwReturn["VAAKONFMRK"] = "   ";
                    dwReturn["VAABUSIMODE"] = "   ";
                    dwReturn["VAAALTERNAT"] = " ";
                    dwReturn["VAAARTDESS"] = "          ";
                    dwReturn["VAAARTSIZE"] = "       ";
                    dwReturn["VAADIMF1"] = "          ";
                    dwReturn["VAADIMF2"] = "          ";
                    dwReturn["VAADIMF3"] = "          ";
                    dwReturn["VAAFILLER"] = "                                                                         ";
                    #endregion
                    break;
            }
        }

        public DataRow Convert2VAART(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVAART(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                case "YCC":
                case "TST":
                default:
                    dwReturn["VAAMANDANT"] = app.Mandant;
                    dwReturn["VAAKOLL"] = "     ";
                    dwReturn["VAAART"] = "                        ";
                    dwReturn["VAAKURZBEZ"] = "     ";
                    dwReturn["VAABEZ"] = "                              ";
                    dwReturn["VAASPERRDAT"] = "0";
                    dwReturn["VAABESTANDF"] = "J";
                    dwReturn["VAAMEBRT"] = "   ";
                    dwReturn["VAABRTFKT"] = "000000000000";
                    dwReturn["VAABRTVON"] = "0";
                    dwReturn["VAABRTBIS"] = "0";
                    dwReturn["VAAMELAE"] = "   ";
                    dwReturn["VAALAEFKT"] = "000000000000";
                    dwReturn["VAALAEVON"] = "0";
                    dwReturn["VAALAEBIS"] = "0";
                    dwReturn["VAAMEHRAP"] = "   ";
                    dwReturn["VAAHRAPVON"] = "0";
                    dwReturn["VAAHRAPBIS"] = "0";
                    dwReturn["VAAMEBRAP"] = "   ";
                    dwReturn["VAABRAPVON"] = "0";
                    dwReturn["VAABRAPBIS"] = "0";
                    dwReturn["VAAMEGEW"] = "   ";
                    dwReturn["VAAGEWGRP"] = " ";
                    dwReturn["VAAGEWFKT"] = "000000000000";
                    dwReturn["VAAGEWVON"] = "0";
                    dwReturn["VAAGEWBIS"] = "0";
                    dwReturn["VAAMENGEH"] = "   ";
                    dwReturn["VAAMEGGRP"] = " ";
                    dwReturn["VAAMEGFKT"] = "000000000000";
                    dwReturn["VAAMEUEB"] = "   ";
                    dwReturn["VAAUEBGRP"] = " ";
                    dwReturn["VAAUEBFKT"] = "000000000000";
                    dwReturn["VAAEAN"] = "0000000000000";
                    dwReturn["VAASTATWNR"] = "            ";
                    dwReturn["VAAZOLLTNR1"] = "                    ";
                    dwReturn["VAAZOLLTNR2"] = "                    ";
                    dwReturn["VAAARTPRGR"] = "   ";
                    dwReturn["VAAPVGRP"] = "   ";
                    dwReturn["VAAAUFART"] = "   ";
                    dwReturn["VAAPACKART"] = "   ";
                    dwReturn["VAAURLAND"] = "   ";
                    dwReturn["VAAWECHSEL"] = " ";
                    dwReturn["VAAURTEXT"] = "         ";
                    dwReturn["VAAREFART"] = "                        ";
                    dwReturn["VAAPART"] = "                    ";
                    dwReturn["VAADKUNDNR"] = "00000000";
                    dwReturn["VAADWERK"] = "   ";
                    dwReturn["VAADABT"] = "   ";
                    dwReturn["VAADART"] = "                    ";
                    dwReturn["VAADVAR"] = "  ";
                    dwReturn["VAAGESANT1"] = "000";
                    dwReturn["VAAGESBEZ1"] = "      ";
                    dwReturn["VAAPOLANT1"] = "000";
                    dwReturn["VAAPOLBEZ1"] = "      ";
                    dwReturn["VAARUECKANT1"] = "000";
                    dwReturn["VAARUECKBEZ1"] = "      ";
                    dwReturn["VAAGESANT2"] = "000";
                    dwReturn["VAAGESBEZ2"] = "      ";
                    dwReturn["VAAPOLANT2"] = "000";
                    dwReturn["VAAPOLBEZ2"] = "      ";
                    dwReturn["VAARUECKANT2"] = "000";
                    dwReturn["VAARUECKBEZ2"] = "      ";
                    dwReturn["VAAGESANT3"] = "000";
                    dwReturn["VAAGESBEZ3"] = "      ";
                    dwReturn["VAAPOLANT3"] = "000";
                    dwReturn["VAAPOLBEZ3"] = "      ";
                    dwReturn["VAARUECKANT3"] = "000";
                    dwReturn["VAARUECKBEZ3"] = "      ";
                    dwReturn["VAAGESANT4"] = "000";
                    dwReturn["VAAGESBEZ4"] = "      ";
                    dwReturn["VAAPOLANT4"] = "000";
                    dwReturn["VAAPOLBEZ4"] = "      ";
                    dwReturn["VAARUECKANT4"] = "000";
                    dwReturn["VAARUECKBEZ4"] = "      ";
                    dwReturn["VAAGESANT5"] = "000";
                    dwReturn["VAAGESBEZ5"] = "      ";
                    dwReturn["VAAPOLANT5"] = "000";
                    dwReturn["VAAPOLBEZ5"] = "      ";
                    dwReturn["VAARUECKANT5"] = "000";
                    dwReturn["VAARUECKBEZ5"] = "      ";
                    dwReturn["VAAGESANT6"] = "000";
                    dwReturn["VAAGESBEZ6"] = "      ";
                    dwReturn["VAAPOLANT6"] = "000";
                    dwReturn["VAAPOLBEZ6"] = "      ";
                    dwReturn["VAARUECKANT6"] = "000";
                    dwReturn["VAARUECKBEZ6"] = "      ";
                    dwReturn["VAAGESANT7"] = "000";
                    dwReturn["VAAGESBEZ7"] = "      ";
                    dwReturn["VAAPOLANT7"] = "000";
                    dwReturn["VAAPOLBEZ7"] = "      ";
                    dwReturn["VAARUECKANT7"] = "000";
                    dwReturn["VAARUECKBEZ7"] = "      ";
                    dwReturn["VAAGESANT8"] = "000";
                    dwReturn["VAAGESBEZ8"] = "      ";
                    dwReturn["VAAPOLANT8"] = "000";
                    dwReturn["VAAPOLBEZ8"] = "      ";
                    dwReturn["VAARUECKANT8"] = "000";
                    dwReturn["VAARUECKBEZ8"] = "      ";
                    dwReturn["VAAHWANT"] = "      ";
                    dwReturn["VAAPOLANTG"] = "0";
                    dwReturn["VAARUEKANTG"] = "0";
                    dwReturn["VAAAENDZL"] = "0";
                    dwReturn["VAAAENDBEN"] = "        ";
                    dwReturn["VAAAENDDAT"] = "0";
                    dwReturn["VAANEUBEN"] = "        ";
                    dwReturn["VAANEUDAT"] = "0";
                    dwReturn["VAAARTST"] = "G";
                    dwReturn["VAAZUREGEL"] = " ";
                    dwReturn["VAAZIELGR"] = "    ";
                    dwReturn["VAAPRGR"] = "K  ";
                    dwReturn["VAAARTGRP"] = "R  ";
                    dwReturn["VAALO"] = "  ";
                    dwReturn["VAABRTCA"] = "N";
                    dwReturn["VAALAECA"] = "N";
                    dwReturn["VAAHRAPCA"] = " ";
                    dwReturn["VAABRAPCA"] = " ";
                    dwReturn["VAAGEWCA"] = "N";
                    dwReturn["VAAPREH"] = "   ";
                    dwReturn["VAAEXCL"] = " ";
                    dwReturn["VAATAX"] = "   ";
                    dwReturn["VAASONDER"] = " ";
                    dwReturn["VAALASCHE"] = " ";
                    dwReturn["VAAFARBKZ"] = " ";
                    dwReturn["VAAWEBLEV"] = "0";
                    dwReturn["VAAARTFAMFL"] = " ";
                    dwReturn["VAAARTFAM"] = "                        ";
                    dwReturn["VAAARTWEB"] = "                        ";
                    dwReturn["VAAWEBSTD"] = " ";
                    dwReturn["VAAARTCOL"] = "          ";
                    dwReturn["VAAARTFIN"] = "          ";
                    dwReturn["VAADIMAM"] = "  ";
                    dwReturn["VAADIMZAM"] = "  ";
                    dwReturn["VAADIMLG"] = "  ";
                    dwReturn["VAAKONFDES"] = " ";
                    dwReturn["VAAKONFRAP"] = " ";
                    dwReturn["VAAKONFCOL"] = " ";
                    dwReturn["VAAKONFLG"] = " ";
                    dwReturn["VAAKONFBRT"] = " ";
                    dwReturn["VAAKONFMRK"] = "   ";
                    dwReturn["VAABUSIMODE"] = "   ";
                    dwReturn["VAAALTERNAT"] = " ";
                    dwReturn["VAAARTDESS"] = "          ";
                    dwReturn["VAAARTSIZE"] = "       ";
                    dwReturn["VAADIMF1"] = "          ";
                    dwReturn["VAADIMF2"] = "          ";
                    dwReturn["VAADIMF3"] = "          ";
                    dwReturn["VAAFILLER"] = "                                                                         ";

                    break;
                case "JLT":
                    break;
            }
            INTEXDBC.MapData(IsConvert, ref dwReturn, dwInput);
            return dwReturn;
        }

        public void MapVAART(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }

        public void SaveVAART(DataRow dwData, string ITXDBVERSION = "50.24", bool update = true)
        {
            DataSet setResult;

            bool flgExist = false;
            setResult = QueryVAART(dwData, 5);
            if (setResult.Tables[0].Rows.Count > 0)
            {
                flgExist = true;
            }
            if (!flgExist)
            {
                InsertVAART(dwData, ITXDBVERSION);
            }
            if (update)
            {
                switch (ITXDBVERSION)
                {
                    case "YGR":
                    case "YCC":
                    case "TST":
                    default:
                        UpdateVAART(dwData, 2);
                        break;
                    case "JLT":
                        UpdateVAART(dwData, 1);
                        break;
                }
            }
        }

        public DataSet QueryVAART(DataRow dwData, int option = 1)
        {

            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0: SResult = QVA00(dwData); break;
                case 1: SResult = QVA01(dwData); break;
                case 2: SResult = QVA02(dwData); break;
                case 3: SResult = QVA03(dwData); break;
                case 31: SResult = QVA31(dwData); break;
                case 5: SResult = QVA05(dwData); break;
                case 4: SResult = QVA04(dwData); break;
                case 6: SResult = QVA06(dwData); break;
                case 7: SResult = QVA07(dwData); break;
                case 8: SResult = QVA08(dwData); break;
                case -1: SResult = QVA_1(dwData); break;
                case 99: SResult = QVA99(dwData); break;
            }


            return SResult;
        }
        public DataSet QVA00(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM VAART WHERE  ROWNUM<2 ";
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT VAAMANDANT,VAAKOLL,VAAART,VAABEZ,VAAARTST FROM VAART WHERE VAAMANDANT=:VAAMANDANT: AND VAAART =:VAAART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }

        public DataSet QVA02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM VAART WHERE VAAMANDANT=:VAAMANDANT: AND VAAART =:VAAART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA03(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT A.* FROM VAART A JOIN VKPOS V ON A.VAAMANDANT=V.VKPMANDANT AND A.VAAKOLL=V.VKPKOLL AND A.VAAART=V.VKPART"
                      + " WHERE VKPMANDANT=:VKPMANDANT: AND VKPSA='  ' AND VKPAUFKRS=:VKPAUFKRS: AND VKPAUFLFD=:VKPAUFLFD: ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA31(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT A.* FROM VAART A JOIN VKPOS V ON A.VAAMANDANT=V.VKPMANDANT AND A.VAAKOLL=V.VKPKOLL AND A.VAAART=V.VKPART"
                      + " WHERE VKPMANDANT=:VKPMANDANT: AND VKPSA='  ' AND VKPAUFKRS=:VKPAUFKRS: AND VKPAUFLFD=:VKPAUFLFD: AND VKPAUFPOS=:VKPAUFPOS:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA05(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM VAART WHERE VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAART =:VAAART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }

        public DataSet QVA06(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT :VAAEXCL:||'/'||RTRIM(VAADART)||'.jpg' AS PHOTOLINK, '' as COMPOSITION,A.*, "
                      + " B.WAFBRTU,B.WAFBRTL,B.WARWBRT,B.WARBRTOL,B.WAFGRLFD,B.WAFGRQM,B.WAFFDDIK,B.WAFFDDIS,B.WAFDDIM,B.WABIND,C.LSLIEFNA, "
                      + " (SELECT stragg(TRIM(TXTKTEXT)) FROM TXTIND T1,TXTKON T2 WHERE T1.TXTIMANDANT = T2.TXTKMANDANT AND T1.TXTIPIND= T2.TXTKPIND "
                      + " AND T1.TXTITXTART = 'WFT' AND TRIM(T1.TXTISIND) = '" + "00000000 " + "'||TRIM(VAADART)) AS REM "
                      + " FROM VAART A ,WASTAMM B,LIEFDAT C "
                      + " WHERE A.VAAMANDANT = B.WAMANDANT(+) AND A.VAADART = B.WADART(+) AND VAADVAR=WADVAR "
                      + " AND B.WAMANDANT = C.LSMANDANT(+) AND B.WALIEFNR = C.LSLIEFNR(+) "
                      + " AND VAAMANDANT=:VAAMANDANT: AND VAAKOLL LIKE '%" + dwData["VAAKOLL"].ToString().Trim() + "%' AND VAAARTST=:VAAARTST: "
                      + " AND VAAART LIKE '%" + dwData["VAAART"].ToString().Trim() + "%' AND VAABEZ LIKE '%" + dwData["VAABEZ"].ToString().Trim() + "%'"
                      + " AND A.VAADART LIKE '%" + dwData["VAADART"].ToString().Trim() + "%' "
                      + dwData["VAAFILLER"].ToString()
                      + dwData["VAAPRGR"].ToString()
                      + " ORDER BY VAAKOLL,VAAART,VAABEZ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA06WS04(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT VAAKOLL,VAAART,stragg(RTRIM(STUELISASB)||':'||TO_NUMBER(SUBSTR(STUELIDATEN,0,4))*0.1)||'%' AS COMPOSITION "
                      + " FROM VAART A JOIN WASTAMM B  ON A.VAAMANDANT = B.WAMANDANT AND A.VAADART = B.WADART AND VAADVAR=WADVAR "
                      + " JOIN STUELI ON STUELIMANDANT=WAMANDANT AND STUELIPKEN='3' AND STUELISAPD='00000000      '||WADART||WADVAR||'  '"
                      + " AND VAAMANDANT=:VAAMANDANT: AND VAAKOLL LIKE '%" + dwData["VAAKOLL"].ToString().Trim() + "%' AND VAAARTST=:VAAARTST: "
                      + " AND VAAART LIKE '%" + dwData["VAAART"].ToString().Trim() + "%' AND VAABEZ LIKE '%" + dwData["VAABEZ"].ToString().Trim() + "%'"
                      + " AND A.VAADART LIKE '%" + dwData["VAADART"].ToString().Trim() + "%' "
                      + dwData["VAAFILLER"].ToString()
                      + dwData["VAAPRGR"].ToString()
                      + "  GROUP by VAAKOLL,VAAART"
                      + " ORDER BY VAAKOLL,VAAART";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA04(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT TRIM(WAART) AS ARTICLE,WABEZ AS DESCRIPTION,TO_CHAR(WAFBRTU * 0.1) AS TWIDTH,TO_CHAR(WAFBRTL * 0.1) AS VWIDTH,TO_CHAR(WAFGRQM) AS GSQM, TO_CHAR(WAFGRLFD) AS GM,TRIM(WAFBEM) AS YARN,(SELECT MAX(WWPRAK * 0.01)FROM WWERT X WHERE X.WWMANDANT = A.WAMANDANT AND X.WWPART = 'EKP'   AND X.WWKUNDNR = A.WAKUNDNR AND X.WWWERK = A.WAWERK AND X.WWABT = A.WAABT AND X.WWART = A.WAART AND X.WWVAR = A.WAVAR) AS PRICE,  WABIND AS SPRICE, WALOHNA,"
                +" S.AA AS COMPOSITION, WANEUD FROM WASTAMM A, (SELECT C, STRAGG(DECODE(A, 'XXX', '', A) || B) AS AA FROM (SELECT DISTINCT C, A, MAX(B) OVER(PARTITION BY C, A) AS B FROM (SELECT DISTINCT C, A, STRAGG(B) OVER(PARTITION BY C, A ORDER BY A, D DESC) B FROM (SELECT DISTINCT TRIM(SUBSTR(STUELISAPD, 15, 20)) AS C, DECODE(TRIM(SUBSTR(STUELIDATEN, 55, 2)), 'R', 'XXX', 'FL', 'FACE:', 'GS','GROUND:') AS A, TO_NUMBER(SUBSTR(STUELIDATEN, 1, 4)) * 0.1 || '%' || TRIM(STUELISASB) AS B, SUBSTR(STUELIDATEN, 1, 4) AS D FROM STUELI WHERE SUBSTR(STUELIDATEN, 55, 2) IN ('R ', 'FL', 'GS')))) GROUP BY C) S WHERE TRIM(A.WAART) = S.C(+) AND WAART LIKE '%'";

            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }


        public DataSet QVA06AFS(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT :VAAEXCL:||'/'||RTRIM(VAADART)||'.jpg' AS PHOTOLINK,  TRIM(VAAART) AS ARTICLE,VAABEZ AS DESCRIPTION,"
                + " EX.WIDTH  ,EX.WEIGHT ,TRIM(VAABEZ) AS YARN,"
                + "TRIM(VAAFILLER) AS COMPOSITION,VAAZOLLTNR1 AS CODE, VAAARTWEB AS PRICE,VAAREFART AS LOCATION,VAAARTFAM AS BOOK,"
                + " A.VAAMANDANT,VAAKOLL,VAAART,VAAKURZBEZ,VAABEZ,VAAPART,VAADART,VAADVAR,VAAAENDBEN,VAAAENDDAT,VAANEUBEN,VAANEUDAT,VAAARTST,VAAPRGR,VAAARTGRP,VAAFILLER,"
                      + " NVL(B.WAFBRTU,0),B.WAFBRTL,B.WAFGRLFD,B.WAFGRQM,B.WAFFDDIK,B.WAFFDDIS,B.WAFDDIM,B.WABIND,NVL(C.LSLIEFNA,'') AS LSLIEFNA, "
                      + " (SELECT stragg(TRIM(TXTKTEXT)) FROM TXTIND T1,TXTKON T2 WHERE T1.TXTIMANDANT = T2.TXTKMANDANT AND T1.TXTIPIND= T2.TXTKPIND "
                      + " AND T1.TXTITXTART = 'VKT' AND TRIM(T1.TXTISIND) = TRIM(VAAKOLL||VAAART)) AS REMARK "
                      + " FROM VAART A   "
                      + " LEFT JOIN WASTAMM B ON   VAAMANDANT = WAMANDANT AND VAADART = WAART"
                      + " LEFT JOIN ICC_EXART EX ON   ARTICLE = VAAART "
                      + " LEFT JOIN LIEFDAT C ON   WAMANDANT = LSMANDANT AND WALIEFNR = LSLIEFNR"
                      + " WHERE  VAAMANDANT=:VAAMANDANT: "
                       + " AND   VAAKOLL LIKE '%" + dwData["VAAKOLL"].ToString().Trim() + "%' AND VAAARTST=:VAAARTST: "
                      + " AND VAAART LIKE '%" + dwData["VAAART"].ToString().Trim() + "%' AND VAABEZ LIKE '%" + dwData["VAABEZ"].ToString().Trim() + "%'"
                      + " AND A.VAADART LIKE '%" + dwData["VAADART"].ToString().Trim() + "%' "
                      + " AND A.VAAFILLER LIKE '%" + dwData["VAAFILLER"].ToString().Trim() + "%' "
                      + " AND A.VAAREFART LIKE '%" + dwData["VAAREFART"].ToString().Trim() + "%'"
                      + " AND A.VAAARTFAM LIKE '%" + dwData["VAAARTFAM"].ToString().Trim() + "%' "
                       + dwData["VAAARTFIN"].ToString()
                      + " ORDER BY VAAKOLL,VAAART,VAABEZ,LSLIEFNA";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        //  ARTICLE,DESCRIPTION,COMPOSITION,WEIGHT,WIDTH,CODE,BOOK,LOCATION,PRICE,SUPPLIER,REMARK
        public string GETAFS(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT :VAAEXCL:||'/'||RTRIM(VAADART)||'.jpg' AS PHOTOLINK,  TRIM(VAAART) AS ARTICLE,VAABEZ AS DESCRIPTION,"
              + " EX.WIDTH  ,EX.WEIGHT ,TRIM(VAABEZ) AS YARN,"
              + "TRIM(VAAFILLER) AS COMPOSITION, CODE, CUSTOMERPRICE AS PRICE,LOCATION, BOOK,"
              + " A.VAAMANDANT,VAAKOLL,VAASPERRDAT,VAAART,VAAKURZBEZ,VAABEZ,VAAPART,VAADART,VAADVAR,VAAAENDBEN,VAAAENDDAT,VAANEUBEN,VAANEUDAT,VAAARTST,VAAPRGR,VAAARTGRP,VAAFILLER,SUPPLIER AS LSLIEFNA"
                    //+ " NVL(B.WAFBRTU,0),B.WAFBRTL,B.WAFGRLFD,B.WAFGRQM,B.WAFFDDIK,B.WAFFDDIS,B.WAFDDIM,B.WABIND,NVL(C.LSLIEFNA,'') AS LSLIEFNA, "
                    + " ,EX.REMARK AS REMARK "
                    + " FROM VAART A   "
                   //+ " LEFT JOIN WASTAMM B ON   VAAMANDANT = WAMANDANT AND VAADART = WAART"
                    + " LEFT JOIN ICC_EXART EX ON   ARTICLE = VAAART "
                    //+ " LEFT JOIN LIEFDAT C ON   WAMANDANT = LSMANDANT AND WALIEFNR = LSLIEFNR"
                    + " WHERE  VAAMANDANT=:VAAMANDANT: "
                     + " AND   VAAKOLL LIKE '%" + dwData["VAAKOLL"].ToString().Trim() + "%' AND VAAARTST=:VAAARTST: "
                    + " AND VAAART LIKE '%" + dwData["VAAART"].ToString().Trim() + "%' AND VAABEZ LIKE '%" + dwData["VAABEZ"].ToString().Trim() + "%'"
                    + " AND A.VAADART LIKE '%" + dwData["VAADART"].ToString().Trim() + "%' "
                    + " AND A.VAAFILLER LIKE '%" + dwData["VAAFILLER"].ToString().Trim() + "%' "
                    + " AND A.VAAREFART LIKE '%" + dwData["VAAREFART"].ToString().Trim() + "%'"
                    + " AND A.VAAARTFAM LIKE '%" + dwData["VAAARTFAM"].ToString().Trim() + "%' "
                     + dwData["VAAARTFIN"].ToString()
                    + " ORDER BY VAAART,VAABEZ,LSLIEFNA";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            return or1.CommandText;
        }
        public DataSet QVA06AFSEX(DataRow dwData, int idx, int rows)
        {
            or1 = OracleDB.CreateCommand();
            string sql = GETAFS(dwData);
            or1.CommandText = "SELECT * FROM (SELECT X.*, ROWNUM RN FROM (" + sql + ") X WHERE  ROWNUM < " + (idx + 1) * rows
                + ")WHERE RN >= " + idx * rows;
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA07(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT RTRIM(decode(TXTKPOS,'10',TXTKTEXT,''))||RTRIM(decode(TXTKPOS,'20',TXTKTEXT,''))||RTRIM(decode(TXTKPOS,'30',TXTKTEXT,'')) AS CONSTRUCTION,A.* FROM VAART A "
                       + "JOIN TXTIND T ON TXTITXTART='VAD' AND TXTISIND=VAAKOLL||VAAART||'                               ' JOIN TXTKON ON TXTIMANDANT=TXTKMANDANT AND  TXTIPIND=TXTKPIND"
                   + " WHERE VAAMANDANT=:VAAMANDANT: AND  VAAART LIKE '%" + dwData["VAAART"].ToString().Trim() + "%'";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA08(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT VAAMANDANT,VAAKOLL,VAAART FROM VAART A "
              + " WHERE VAAMANDANT=:VAAMANDANT: AND  VAAART LIKE '%" + dwData["VAAART"].ToString().Trim() + "%'";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA10(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT substr(sddaten, 2, 20) AS ARTNAME FROM SDDAT,VAART WHERE sdsa = '0178' and substr(sdkey, 24, 1) = 'V' and substr(sddaten, 1, 1) = 'A'"
               + " and substr(sdkey, 3, 3) =vaaartgrp AND VAAMANDANT  LIKE'" + dwData["VAAMANDANT"].ToString().Trim() + "%' AND VAAKOLL LIKE '" + dwData["VAAKOLL"].ToString().Trim() + "%'AND vaaart  LIKE '" + dwData["VAAART"].ToString().Trim() + "%'";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA11(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT VAAMANDANT,VAAKOLL,VAAART,VAABEZ,VAAARTST FROM VAART WHERE VAAMANDANT=:VAAMANDANT: AND SUBSTR(VAAART,1,18) =:VAAART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA_1(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT RTRIM(VAAART) AS KEY, VAAMANDANT,VAAKOLL,VAAART,VAABEZ,VAAARTST,VAADART,VAADVAR,VAAARTWEB,VAANEUDAT  FROM VAART "
                       + " WHERE VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAARTST=:VAAARTST:"
                         + " ORDER BY VAAKOLL,VAAART,VAABEZ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA09(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT RTRIM(VAAART) AS KEY, VAAMANDANT,VAAKOLL,VAAART,VAABEZ,VAAARTST,VAADART,VAADVAR,VAAARTWEB,NVL(WALIEFNR,'00000000') AS WALIEFNR  FROM VAART "
                + " LEFT JOIN WASTAMM ON WAMANDANT=VAAMANDANT AND WAART=VAADART AND WAVAR=VAADVAR "
                       + " WHERE VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAARTST=:VAAARTST:"
                         + " ORDER BY VAAKOLL,VAAART,VAABEZ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVAMAX(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT MAX(VAAART) AS VAAART FROM VAART WHERE VAAMANDANT=:VAAMANDANT:"
                + dwData["VAAART"].ToString();
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QVA99(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM VAART";
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public override string BATCHINSERT(DataRow dwData)
        {
            dwData["VAANEUBEN"] = app.User;
            dwData["VAANEUDAT"] = date;
            string value = "";
            switch (app.company)
            {
                default:
                case "SXN":
                case "YGR":
                case "TST":
                    value = "INTO VAART  "
                        + "VALUES(:VAAMANDANT:,:VAAKOLL:,:VAAART:,:VAAKURZBEZ:,:VAABEZ:,:VAASPERRDAT:,:VAABESTANDF:,:VAAMEBRT:,:VAABRTFKT:,:VAABRTVON:,:VAABRTBIS:,:VAAMELAE:,:VAALAEFKT:,:VAALAEVON:,:VAALAEBIS:,:VAAMEHRAP:,:VAAHRAPVON:,:VAAHRAPBIS:,:VAAMEBRAP:,:VAABRAPVON:,:VAABRAPBIS:,:VAAMEGEW:,:VAAGEWGRP:,:VAAGEWFKT:,:VAAGEWVON:,:VAAGEWBIS:,:VAAMENGEH:,:VAAMEGGRP:,:VAAMEGFKT:,:VAAMEUEB:,:VAAUEBGRP:,:VAAUEBFKT:,:VAAEAN:,:VAASTATWNR:,:VAAZOLLTNR1:,:VAAZOLLTNR2:,:VAAARTPRGR:,:VAAPVGRP:,:VAAAUFART:,:VAAPACKART:,:VAAURLAND:,:VAAWECHSEL:,:VAAURTEXT:,:VAAREFART:,:VAAPART:,:VAADKUNDNR:,:VAADWERK:,:VAADABT:,:VAADART:,:VAADVAR:,:VAAGESANT1:,:VAAGESBEZ1:,:VAAPOLANT1:,:VAAPOLBEZ1:,:VAARUECKANT1:,:VAARUECKBEZ1:,:VAAGESANT2:,:VAAGESBEZ2:,:VAAPOLANT2:,:VAAPOLBEZ2:,:VAARUECKANT2:,:VAARUECKBEZ2:,:VAAGESANT3:,:VAAGESBEZ3:,:VAAPOLANT3:,:VAAPOLBEZ3:,:VAARUECKANT3:,:VAARUECKBEZ3:,:VAAGESANT4:,:VAAGESBEZ4:,:VAAPOLANT4:,:VAAPOLBEZ4:,:VAARUECKANT4:,:VAARUECKBEZ4:,:VAAGESANT5:,:VAAGESBEZ5:,:VAAPOLANT5:,:VAAPOLBEZ5:,:VAARUECKANT5:,:VAARUECKBEZ5:,:VAAGESANT6:,:VAAGESBEZ6:,:VAAPOLANT6:,:VAAPOLBEZ6:,:VAARUECKANT6:,:VAARUECKBEZ6:,:VAAGESANT7:,:VAAGESBEZ7:,:VAAPOLANT7:,:VAAPOLBEZ7:,:VAARUECKANT7:,:VAARUECKBEZ7:,:VAAGESANT8:,:VAAGESBEZ8:,:VAAPOLANT8:,:VAAPOLBEZ8:,:VAARUECKANT8:,:VAARUECKBEZ8:,:VAAHWANT:,:VAAPOLANTG:,:VAARUEKANTG:,:VAAAENDZL:,:VAAAENDBEN:,:VAAAENDDAT:,:VAANEUBEN:,:VAANEUDAT:,:VAAARTST:,:VAAZUREGEL:,:VAAZIELGR:,:VAAPRGR:,:VAAARTGRP:,:VAALO:,:VAABRTCA:,:VAALAECA:,:VAAHRAPCA:,:VAABRAPCA:,:VAAGEWCA:,:VAAPREH:,:VAAEXCL:,:VAATAX:,:VAASONDER:,:VAALASCHE:,:VAAFARBKZ:,:VAAWEBLEV:,:VAAARTFAMFL:,:VAAARTFAM:,:VAAARTWEB:,:VAAWEBSTD:,:VAAARTCOL:,:VAAARTFIN:,:VAADIMAM:,:VAADIMZAM:,:VAADIMLG:,:VAAKONFDES:,:VAAKONFRAP:,:VAAKONFCOL:,:VAAKONFLG:,:VAAKONFBRT:,:VAAKONFMRK:,:VAABUSIMODE:,:VAAALTERNAT:,:VAAARTDESS:,:VAAARTSIZE:,:VAADIMF1:,:VAADIMF2:,:VAADIMF3:,:VAAFILLER:)";
                    value = INTEXDBC.InjectData(value, dwData);
                    break;
            }
            return value;
        }
        public void InsertVAART(DataRow dwData, string ITXDBVERSION = "50.24")
        {

            dwData["VAANEUBEN"] = app.User;
            dwData["VAANEUDAT"] = date;

            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                case "SXN":
                case "TST":
                default:
                    or1.CommandText = "INSERT INTO VAART(VAAMANDANT, VAAKOLL, VAAART, VAAKURZBEZ, VAABEZ, VAASPERRDAT, VAABESTANDF, VAAMEBRT, VAABRTFKT, VAABRTVON, VAABRTBIS, VAAMELAE, VAALAEFKT, VAALAEVON, VAALAEBIS, VAAMEHRAP, VAAHRAPVON, VAAHRAPBIS, VAAMEBRAP, VAABRAPVON, VAABRAPBIS, VAAMEGEW, VAAGEWGRP, VAAGEWFKT, VAAGEWVON, VAAGEWBIS, VAAMENGEH, VAAMEGGRP, VAAMEGFKT, VAAMEUEB, VAAUEBGRP, VAAUEBFKT, VAAEAN, VAASTATWNR, VAAZOLLTNR1, VAAZOLLTNR2, VAAARTPRGR, VAAPVGRP, VAAAUFART, VAAPACKART, VAAURLAND, VAAWECHSEL, VAAURTEXT, VAAREFART, VAAPART, VAADKUNDNR, VAADWERK, VAADABT, VAADART, VAADVAR, VAAGESANT1, VAAGESBEZ1, VAAPOLANT1, VAAPOLBEZ1, VAARUECKANT1, VAARUECKBEZ1, VAAGESANT2, VAAGESBEZ2, VAAPOLANT2, VAAPOLBEZ2, VAARUECKANT2, VAARUECKBEZ2, VAAGESANT3, VAAGESBEZ3, VAAPOLANT3, VAAPOLBEZ3, VAARUECKANT3, VAARUECKBEZ3, VAAGESANT4, VAAGESBEZ4, VAAPOLANT4, VAAPOLBEZ4, VAARUECKANT4, VAARUECKBEZ4, VAAGESANT5, VAAGESBEZ5, VAAPOLANT5, VAAPOLBEZ5, VAARUECKANT5, VAARUECKBEZ5, VAAGESANT6, VAAGESBEZ6, VAAPOLANT6, VAAPOLBEZ6, VAARUECKANT6, VAARUECKBEZ6, VAAGESANT7, VAAGESBEZ7, VAAPOLANT7, VAAPOLBEZ7, VAARUECKANT7, VAARUECKBEZ7, VAAGESANT8, VAAGESBEZ8, VAAPOLANT8, VAAPOLBEZ8, VAARUECKANT8, VAARUECKBEZ8, VAAHWANT, VAAPOLANTG, VAARUEKANTG, VAAAENDZL, VAAAENDBEN, VAAAENDDAT, VAANEUBEN, VAANEUDAT, VAAARTST, VAAZUREGEL, VAAZIELGR, VAAPRGR, VAAARTGRP, VAALO, VAABRTCA, VAALAECA, VAAHRAPCA, VAABRAPCA, VAAGEWCA, VAAPREH, VAAEXCL, VAATAX, VAASONDER, VAALASCHE, VAAFARBKZ, VAAWEBLEV, VAAARTFAMFL, VAAARTFAM, VAAARTWEB, VAAWEBSTD, VAAARTCOL, VAAARTFIN, VAADIMAM, VAADIMZAM, VAADIMLG, VAAKONFDES, VAAKONFRAP, VAAKONFCOL, VAAKONFLG, VAAKONFBRT, VAAKONFMRK, VAABUSIMODE, VAAALTERNAT, VAAARTDESS, VAAARTSIZE, VAADIMF1, VAADIMF2, VAADIMF3, VAAFILLER)"
                        + "VALUES(:VAAMANDANT:,:VAAKOLL:,:VAAART:,:VAAKURZBEZ:,:VAABEZ:,:VAASPERRDAT:,:VAABESTANDF:,:VAAMEBRT:,:VAABRTFKT:,:VAABRTVON:,:VAABRTBIS:,:VAAMELAE:,:VAALAEFKT:,:VAALAEVON:,:VAALAEBIS:,:VAAMEHRAP:,:VAAHRAPVON:,:VAAHRAPBIS:,:VAAMEBRAP:,:VAABRAPVON:,:VAABRAPBIS:,:VAAMEGEW:,:VAAGEWGRP:,:VAAGEWFKT:,:VAAGEWVON:,:VAAGEWBIS:,:VAAMENGEH:,:VAAMEGGRP:,:VAAMEGFKT:,:VAAMEUEB:,:VAAUEBGRP:,:VAAUEBFKT:,:VAAEAN:,:VAASTATWNR:,:VAAZOLLTNR1:,:VAAZOLLTNR2:,:VAAARTPRGR:,:VAAPVGRP:,:VAAAUFART:,:VAAPACKART:,:VAAURLAND:,:VAAWECHSEL:,:VAAURTEXT:,:VAAREFART:,:VAAPART:,:VAADKUNDNR:,:VAADWERK:,:VAADABT:,:VAADART:,:VAADVAR:,:VAAGESANT1:,:VAAGESBEZ1:,:VAAPOLANT1:,:VAAPOLBEZ1:,:VAARUECKANT1:,:VAARUECKBEZ1:,:VAAGESANT2:,:VAAGESBEZ2:,:VAAPOLANT2:,:VAAPOLBEZ2:,:VAARUECKANT2:,:VAARUECKBEZ2:,:VAAGESANT3:,:VAAGESBEZ3:,:VAAPOLANT3:,:VAAPOLBEZ3:,:VAARUECKANT3:,:VAARUECKBEZ3:,:VAAGESANT4:,:VAAGESBEZ4:,:VAAPOLANT4:,:VAAPOLBEZ4:,:VAARUECKANT4:,:VAARUECKBEZ4:,:VAAGESANT5:,:VAAGESBEZ5:,:VAAPOLANT5:,:VAAPOLBEZ5:,:VAARUECKANT5:,:VAARUECKBEZ5:,:VAAGESANT6:,:VAAGESBEZ6:,:VAAPOLANT6:,:VAAPOLBEZ6:,:VAARUECKANT6:,:VAARUECKBEZ6:,:VAAGESANT7:,:VAAGESBEZ7:,:VAAPOLANT7:,:VAAPOLBEZ7:,:VAARUECKANT7:,:VAARUECKBEZ7:,:VAAGESANT8:,:VAAGESBEZ8:,:VAAPOLANT8:,:VAAPOLBEZ8:,:VAARUECKANT8:,:VAARUECKBEZ8:,:VAAHWANT:,:VAAPOLANTG:,:VAARUEKANTG:,:VAAAENDZL:,:VAAAENDBEN:,:VAAAENDDAT:,:VAANEUBEN:,:VAANEUDAT:,:VAAARTST:,:VAAZUREGEL:,:VAAZIELGR:,:VAAPRGR:,:VAAARTGRP:,:VAALO:,:VAABRTCA:,:VAALAECA:,:VAAHRAPCA:,:VAABRAPCA:,:VAAGEWCA:,:VAAPREH:,:VAAEXCL:,:VAATAX:,:VAASONDER:,:VAALASCHE:,:VAAFARBKZ:,:VAAWEBLEV:,:VAAARTFAMFL:,:VAAARTFAM:,:VAAARTWEB:,:VAAWEBSTD:,:VAAARTCOL:,:VAAARTFIN:,:VAADIMAM:,:VAADIMZAM:,:VAADIMLG:,:VAAKONFDES:,:VAAKONFRAP:,:VAAKONFCOL:,:VAAKONFLG:,:VAAKONFBRT:,:VAAKONFMRK:,:VAABUSIMODE:,:VAAALTERNAT:,:VAAARTDESS:,:VAAARTSIZE:,:VAADIMF1:,:VAADIMF2:,:VAADIMF3:,:VAAFILLER:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
            }
            Connect2Proxy(or1);
        }

        public void DeleteVAART(DataRow dwData, int option = 1)
        { 

            DVAART02(dwData);
        }
        public void DVAART00(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM VAART WHERE VAAMANDANT=:VAAMANDANT:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void DVAART02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM VAART WHERE VAAMANDANT=:VAAMANDANT: AND VAAART =:VAAART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void DVAART01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "DELETE FROM VAART WHERE VAAKOLL=:VAAKOLL:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void UpdateVAART(DataRow dwData, int option = 1)
        {
            if (dwData != null)
            {
                dwData["VAAAENDBEN"] = app.User;
                dwData["VAAAENDDAT"] = date;
            }
            if (option == 0)
            {
                switch (app.company)
                {
                    case "YGR":
                    case "SXN":
                    case "TST":
                    case "AFS":
                        UVAART02(dwData);
                        break;
                    case "UBT":
                        UVAART04(dwData);
                        break;
                    default:
                        UVAART01(dwData);
                        break;
                }
            }


        }
        public void UVAART01(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            #region====Command====
            or1.CommandText = "UPDATE VAART SET "
                + "VAAMANDANT=:VAAMANDANT:,"
                + "VAAKOLL=:VAAKOLL:,"
                + "VAAART=:VAAART:,"
                + "VAABEZ=:VAABEZ:,"
                + "VAABESTANDF=:VAABESTANDF:,"
                + "VAAMEBRT=:VAAMEBRT:,"
                + "VAABRTFKT=:VAABRTFKT:,"
                + "VAABRTVON=:VAABRTVON:,"
                + "VAABRTBIS=:VAABRTBIS:,"
                + "VAAMELAE=:VAAMELAE:,"
                + "VAALAEFKT=:VAALAEFKT:,"
                + "VAALAEVON=:VAALAEVON:,"
                + "VAALAEBIS=:VAALAEBIS:,"
                + "VAAMEHRAP=:VAAMEHRAP:,"
                + "VAAHRAPVON=:VAAHRAPVON:,"
                + "VAAHRAPBIS=:VAAHRAPBIS:,"
                + "VAAMEBRAP=:VAAMEBRAP:,"
                + "VAABRAPVON=:VAABRAPVON:,"
                + "VAABRAPBIS=:VAABRAPBIS:,"
                + "VAAMEGEW=:VAAMEGEW:,"
                + "VAAGEWGRP=:VAAGEWGRP:,"
                + "VAAGEWFKT=:VAAGEWFKT:,"
                + "VAAGEWVON=:VAAGEWVON:,"
                + "VAAGEWBIS=:VAAGEWBIS:,"
                + "VAAMENGEH=:VAAMENGEH:,"
                + "VAAMEGGRP=:VAAMEGGRP:,"
                + "VAAMEGFKT=:VAAMEGFKT:,"
                + "VAAMEUEB=:VAAMEUEB:,"
                + "VAAUEBGRP=:VAAUEBGRP:,"
                + "VAAUEBFKT=:VAAUEBFKT:,"
                + "VAAEAN=:VAAEAN:,"
                + "VAASTATWNR=:VAASTATWNR:,"
                + "VAAZOLLTNR1=:VAAZOLLTNR1:,"
                + "VAAZOLLTNR2=:VAAZOLLTNR2:,"
                + "VAAARTPRGR=:VAAARTPRGR:,"
                + "VAAPVGRP=:VAAPVGRP:,"
                + "VAAAUFART=:VAAAUFART:,"
                + "VAAPACKART=:VAAPACKART:,"
                + "VAAURLAND=:VAAURLAND:,"
                + "VAAWECHSEL=:VAAWECHSEL:,"
                + "VAAURTEXT=:VAAURTEXT:,"
                + "VAAREFART=:VAAREFART:,"
                + "VAAPART=:VAAPART:,"
                + "VAADKUNDNR=:VAADKUNDNR:,"
                + "VAADWERK=:VAADWERK:,"
                + "VAADABT=:VAADABT:,"
                + "VAADART=:VAADART:,"
                + "VAADVAR=:VAADVAR:,"
                + "VAAGESANT1=:VAAGESANT1:,"
                + "VAAGESBEZ1=:VAAGESBEZ1:,"
                + "VAAPOLANT1=:VAAPOLANT1:,"
                + "VAAPOLBEZ1=:VAAPOLBEZ1:,"
                + "VAARUECKANT1=:VAARUECKANT1:,"
                + "VAARUECKBEZ1=:VAARUECKBEZ1:,"
                + "VAAGESANT2=:VAAGESANT2:,"
                + "VAAGESBEZ2=:VAAGESBEZ2:,"
                + "VAAPOLANT2=:VAAPOLANT2:,"
                + "VAAPOLBEZ2=:VAAPOLBEZ2:,"
                + "VAARUECKANT2=:VAARUECKANT2:,"
                + "VAARUECKBEZ2=:VAARUECKBEZ2:,"
                + "VAAGESANT3=:VAAGESANT3:,"
                + "VAAGESBEZ3=:VAAGESBEZ3:,"
                + "VAAPOLANT3=:VAAPOLANT3:,"
                + "VAAPOLBEZ3=:VAAPOLBEZ3:,"
                + "VAARUECKANT3=:VAARUECKANT3:,"
                + "VAARUECKBEZ3=:VAARUECKBEZ3:,"
                + "VAAGESANT4=:VAAGESANT4:,"
                + "VAAGESBEZ4=:VAAGESBEZ4:,"
                + "VAAPOLANT4=:VAAPOLANT4:,"
                + "VAAPOLBEZ4=:VAAPOLBEZ4:,"
                + "VAARUECKANT4=:VAARUECKANT4:,"
                + "VAARUECKBEZ4=:VAARUECKBEZ4:,"
                + "VAAGESANT5=:VAAGESANT5:,"
                + "VAAGESBEZ5=:VAAGESBEZ5:,"
                + "VAAPOLANT5=:VAAPOLANT5:,"
                + "VAAPOLBEZ5=:VAAPOLBEZ5:,"
                + "VAARUECKANT5=:VAARUECKANT5:,"
                + "VAARUECKBEZ5=:VAARUECKBEZ5:,"
                + "VAAGESANT6=:VAAGESANT6:,"
                + "VAAGESBEZ6=:VAAGESBEZ6:,"
                + "VAAPOLANT6=:VAAPOLANT6:,"
                + "VAAPOLBEZ6=:VAAPOLBEZ6:,"
                + "VAARUECKANT6=:VAARUECKANT6:,"
                + "VAARUECKBEZ6=:VAARUECKBEZ6:,"
                + "VAAGESANT7=:VAAGESANT7:,"
                + "VAAGESBEZ7=:VAAGESBEZ7:,"
                + "VAAPOLANT7=:VAAPOLANT7:,"
                + "VAAPOLBEZ7=:VAAPOLBEZ7:,"
                + "VAARUECKANT7=:VAARUECKANT7:,"
                + "VAARUECKBEZ7=:VAARUECKBEZ7:,"
                + "VAAGESANT8=:VAAGESANT8:,"
                + "VAAGESBEZ8=:VAAGESBEZ8:,"
                + "VAAPOLANT8=:VAAPOLANT8:,"
                + "VAAPOLBEZ8=:VAAPOLBEZ8:,"
                + "VAARUECKANT8=:VAARUECKANT8:,"
                + "VAARUECKBEZ8=:VAARUECKBEZ8:,"
                + "VAAHWANT=:VAAHWANT:,"
                + "VAAPOLANTG=:VAAPOLANTG:,"
                + "VAARUEKANTG=:VAARUEKANTG:,"
                + "VAAAENDZL=:VAAAENDZL:,"
                + "VAAAENDBEN=:VAAAENDBEN:,"
                + "VAAAENDDAT=:VAAAENDDAT:,"
                + "VAAARTST=:VAAARTST:,"
                + "VAAZUREGEL=:VAAZUREGEL:,"
                + "VAAZIELGR=:VAAZIELGR:,"
                + "VAAPRGR=:VAAPRGR:,"
                + "VAAARTGRP=:VAAARTGRP:,"
                + "VAALO=:VAALO:,"
                + "VAABRTCA=:VAABRTCA:,"
                + "VAALAECA=:VAALAECA:,"
                + "VAAHRAPCA=:VAAHRAPCA:,"
                + "VAABRAPCA=:VAABRAPCA:,"
                + "VAAGEWCA=:VAAGEWCA:,"
                + "VAAPREH=:VAAPREH:,"
                + "VAAEXCL=:VAAEXCL:,"
                + "VAATAX=:VAATAX:,"
                + "VAASONDER=:VAASONDER:,"
                + "VAAFILLER=:VAAFILLER:"
                + " WHERE  VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAART=:VAAART:";
            #endregion
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void UVAART02(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE VAART SET VAAMANDANT=:VAAMANDANT:,VAAKOLL=:VAAKOLL:,VA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BEZ8=:VAARUECKBEZ8:,VAAHWANT=:VAAHWANT:,VAAPOLANTG=:VAAPOLANTG:,VAARUEKANTG=:VAARUEKANTG:,VAAAENDZL=:VAAAENDZL:,VAAAENDBEN=:VAAAENDBEN:,VAAAENDDAT=:VAAAENDDAT:,VAANEUBEN=:VAANEUBEN:,VAANEUDAT=:VAANEUDAT:,VAAARTST=:VAAARTST:,VAAZUREGEL=:VAAZUREGEL:,VAAZIELGR=:VAAZIELGR:,VAAPRGR=:VAAPRGR:,VAAARTGRP=:VAAARTGRP:,VAALO=:VAALO:,VAABRTCA=:VAABRTCA:,VAALAECA=:VAALAECA:,VAAHRAPCA=:VAAHRAPCA:,VAABRAPCA=:VAABRAPCA:,VAAGEWCA=:VAAGEWCA:,VAAPREH=:VAAPREH:,VAAEXCL=:VAAEXCL:,VAATAX=:VAATAX:,VAASONDER=:VAASONDER:,VAALASCHE=:VAALASCHE:,VAAFARBKZ=:VAAFARBKZ:,VAAWEBLEV=:VAAWEBLEV:,VAAARTFAMFL=:VAAARTFAMFL:,VAAARTFAM=:VAAARTFAM:,VAAARTWEB=:VAAARTWEB:,VAAWEBSTD=:VAAWEBSTD:,VAAARTCOL=:VAAARTCOL:,VAAARTFIN=:VAAARTFIN:,VAADIMAM=:VAADIMAM:,VAADIMZAM=:VAADIMZAM:,VAADIMLG=:VAADIMLG:,VAAKONFDES=:VAAKONFDES:,VAAKONFRAP=:VAAKONFRAP:,VAAKONFCOL=:VAAKONFCOL:,VAAKONFLG=:VAAKONFLG:,VAAKONFBRT=:VAAKONFBRT:,VAAKONFMRK=:VAAKONFMRK:,VAABUSIMODE=:VAABUSIMODE:,VAAALTERNAT=:VAAALTERNAT:,VAAARTDESS=:VAAARTDESS:,VAAARTSIZE=:VAAARTSIZE:,VAADIMF1=:VAADIMF1:,VAADIMF2=:VAADIMF2:,VAADIMF3=:VAADIMF3:,VAAFILLER=:VAAFILLER:"
     + " WHERE  VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAART=:VAAART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);

        }
        public void UVAART03(DataRow dwData)
        {
            #region====Command====

            or1.CommandText = "UPDATE VAART SET "
            + "VAAMANDANT=:VAAMANDANT:,"
            + "VAAKOLL=:VAAKOLL:,"
            + "VAAART=:VAAFILLER:,"
            + "VAAKURZBEZ=:VAAKURZBEZ:,"
            + "VAABEZ=:VAABEZ:,"
            + "VAASPERRDAT=:VAASPERRDAT:,"
            + "VAABESTANDF=:VAABESTANDF:,"
            + "VAAMEBRT=:VAAMEBRT:,"
            + "VAABRTFKT=:VAABRTFKT:,"
            + "VAABRTVON=:VAABRTVON:,"
            + "VAABRTBIS=:VAABRTBIS:,"
            + "VAAMELAE=:VAAMELAE:,"
            + "VAALAEFKT=:VAALAEFKT:,"
            + "VAALAEVON=:VAALAEVON:,"
            + "VAALAEBIS=:VAALAEBIS:,"
            + "VAAMEHRAP=:VAAMEHRAP:,"
            + "VAAHRAPVON=:VAAHRAPVON:,"
            + "VAAHRAPBIS=:VAAHRAPBIS:,"
            + "VAAMEBRAP=:VAAMEBRAP:,"
            + "VAABRAPVON=:VAABRAPVON:,"
            + "VAABRAPBIS=:VAABRAPBIS:,"
            + "VAAMEGEW=:VAAMEGEW:,"
            + "VAAGEWGRP=:VAAGEWGRP:,"
            + "VAAGEWFKT=:VAAGEWFKT:,"
            + "VAAGEWVON=:VAAGEWVON:,"
            + "VAAGEWBIS=:VAAGEWBIS:,"
            + "VAAMENGEH=:VAAMENGEH:,"
            + "VAAMEGGRP=:VAAMEGGRP:,"
            + "VAAMEGFKT=:VAAMEGFKT:,"
            + "VAAMEUEB=:VAAMEUEB:,"
            + "VAAUEBGRP=:VAAUEBGRP:,"
            + "VAAUEBFKT=:VAAUEBFKT:,"
            + "VAAEAN=:VAAEAN:,"
            + "VAASTATWNR=:VAASTATWNR:,"
            + "VAAZOLLTNR1=:VAAZOLLTNR1:,"
            + "VAAZOLLTNR2=:VAAZOLLTNR2:,"
            + "VAAARTPRGR=:VAAARTPRGR:,"
            + "VAAPVGRP=:VAAPVGRP:,"
            + "VAAAUFART=:VAAAUFART:,"
            + "VAAPACKART=:VAAPACKART:,"
            + "VAAURLAND=:VAAURLAND:,"
            + "VAAWECHSEL=:VAAWECHSEL:,"
            + "VAAURTEXT=:VAAURTEXT:,"
            + "VAAREFART=:VAAREFART:,"
            + "VAAPART=:VAAPART:,"
            + "VAADKUNDNR=:VAADKUNDNR:,"
            + "VAADWERK=:VAADWERK:,"
            + "VAADABT=:VAADABT:,"
            + "VAADART=:VAAFILLER:,"
            + "VAADVAR=:VAADVAR:,"
            + "VAAGESANT1=:VAAGESANT1:,"
            + "VAAGESBEZ1=:VAAGESBEZ1:,"
            + "VAAPOLANT1=:VAAPOLANT1:,"
            + "VAAPOLBEZ1=:VAAPOLBEZ1:,"
            + "VAARUECKANT1=:VAARUECKANT1:,"
            + "VAARUECKBEZ1=:VAARUECKBEZ1:,"
            + "VAAGESANT2=:VAAGESANT2:,"
            + "VAAGESBEZ2=:VAAGESBEZ2:,"
            + "VAAPOLANT2=:VAAPOLANT2:,"
            + "VAAPOLBEZ2=:VAAPOLBEZ2:,"
            + "VAARUECKANT2=:VAARUECKANT2:,"
            + "VAARUECKBEZ2=:VAARUECKBEZ2:,"
            + "VAAGESANT3=:VAAGESANT3:,"
            + "VAAGESBEZ3=:VAAGESBEZ3:,"
            + "VAAPOLANT3=:VAAPOLANT3:,"
            + "VAAPOLBEZ3=:VAAPOLBEZ3:,"
            + "VAARUECKANT3=:VAARUECKANT3:,"
            + "VAARUECKBEZ3=:VAARUECKBEZ3:,"
            + "VAAGESANT4=:VAAGESANT4:,"
            + "VAAGESBEZ4=:VAAGESBEZ4:,"
            + "VAAPOLANT4=:VAAPOLANT4:,"
            + "VAAPOLBEZ4=:VAAPOLBEZ4:,"
            + "VAARUECKANT4=:VAARUECKANT4:,"
            + "VAARUECKBEZ4=:VAARUECKBEZ4:,"
            + "VAAGESANT5=:VAAGESANT5:,"
            + "VAAGESBEZ5=:VAAGESBEZ5:,"
            + "VAAPOLANT5=:VAAPOLANT5:,"
            + "VAAPOLBEZ5=:VAAPOLBEZ5:,"
            + "VAARUECKANT5=:VAARUECKANT5:,"
            + "VAARUECKBEZ5=:VAARUECKBEZ5:,"
            + "VAAGESANT6=:VAAGESANT6:,"
            + "VAAGESBEZ6=:VAAGESBEZ6:,"
            + "VAAPOLANT6=:VAAPOLANT6:,"
            + "VAAPOLBEZ6=:VAAPOLBEZ6:,"
            + "VAARUECKANT6=:VAARUECKANT6:,"
            + "VAARUECKBEZ6=:VAARUECKBEZ6:,"
            + "VAAGESANT7=:VAAGESANT7:,"
            + "VAAGESBEZ7=:VAAGESBEZ7:,"
            + "VAAPOLANT7=:VAAPOLANT7:,"
            + "VAAPOLBEZ7=:VAAPOLBEZ7:,"
            + "VAARUECKANT7=:VAARUECKANT7:,"
            + "VAARUECKBEZ7=:VAARUECKBEZ7:,"
            + "VAAGESANT8=:VAAGESANT8:,"
            + "VAAGESBEZ8=:VAAGESBEZ8:,"
            + "VAAPOLANT8=:VAAPOLANT8:,"
            + "VAAPOLBEZ8=:VAAPOLBEZ8:,"
            + "VAARUECKANT8=:VAARUECKANT8:,"
            + "VAARUECKBEZ8=:VAARUECKBEZ8:,"
            + "VAAHWANT=:VAAHWANT:,"
            + "VAAPOLANTG=:VAAPOLANTG:,"
            + "VAARUEKANTG=:VAARUEKANTG:,"
            + "VAAAENDZL=:VAAAENDZL:,"
            + "VAAAENDBEN=:VAAAENDBEN:,"
            + "VAAAENDDAT=:VAAAENDDAT:,"
            + "VAAARTST=:VAAARTST:,"
            + "VAAZUREGEL=:VAAZUREGEL:,"
            + "VAAZIELGR=:VAAZIELGR:,"
            + "VAAPRGR=:VAAPRGR:,"
            + "VAAARTGRP=:VAAARTGRP:,"
            + "VAALO=:VAALO:,"
            + "VAABRTCA=:VAABRTCA:,"
            + "VAALAECA=:VAALAECA:,"
            + "VAAHRAPCA=:VAAHRAPCA:,"
            + "VAABRAPCA=:VAABRAPCA:,"
            + "VAAGEWCA=:VAAGEWCA:,"
            + "VAAPREH=:VAAPREH:,"
            + "VAAEXCL=:VAAEXCL:,"
            + "VAATAX=:VAATAX:,"
            + "VAASONDER=:VAASONDER:,"
            + "VAALASCHE=:VAALASCHE:,"
            + "VAAFARBKZ=:VAAFARBKZ:,"
            + "VAAWEBLEV=:VAAWEBLEV:,"
            + "VAAARTFAMFL=:VAAARTFAMFL:,"
            + "VAAARTFAM=:VAAARTFAM:,"
            + "VAAARTWEB=:VAAARTWEB:,"
            + "VAAWEBSTD=:VAAWEBSTD:,"
            + "VAAARTCOL=:VAAARTCOL:,"
            + "VAAARTFIN=:VAAARTFIN:,"
            + "VAADIMAM=:VAADIMAM:,"
            + "VAADIMZAM=:VAADIMZAM:,"
            + "VAADIMLG=:VAADIMLG:,"
            + "VAAKONFDES=:VAAKONFDES:,"
            + "VAAKONFRAP=:VAAKONFRAP:,"
            + "VAAKONFCOL=:VAAKONFCOL:,"
            + "VAAKONFLG=:VAAKONFLG:,"
            + "VAAKONFBRT=:VAAKONFBRT:,"
            + "VAAKONFMRK=:VAAKONFMRK:,"
            + "VAABUSIMODE=:VAABUSIMODE:,"
            + "VAAALTERNAT=:VAAALTERNAT:,"
            + "VAAARTDESS=:VAAARTDESS:,"
            + "VAAARTSIZE=:VAAARTSIZE:,"
            + "VAADIMF1=:VAADIMF1:,"
            + "VAADIMF2=:VAADIMF2:,"
            + "VAADIMF3=:VAADIMF3:,"
            + "VAAFILLER=:VAAART: "
                + " WHERE     VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAART=:VAAART:";
            #endregion
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
            or1 = OracleDB.CreateCommand();
        }
        public void UVAART04(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE VAART SET VAAMANDANT=:VAAM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AT:,VAAARTST=:VAAARTST:,VAAZUREGEL=:VAAZUREGEL:,VAAZIELGR=:VAAZIELGR:,VAAPRGR=:VAAPRGR:,VAAARTGRP=:VAAARTGRP:,VAALO=:VAALO:,VAABRTCA=:VAABRTCA:,VAALAECA=:VAALAECA:,VAAHRAPCA=:VAAHRAPCA:,VAABRAPCA=:VAABRAPCA:,VAAGEWCA=:VAAGEWCA:,VAAPREH=:VAAPREH:,VAAEXCL=:VAAEXCL:,VAATAX=:VAATAX:,VAASONDER=:VAASONDER:,VAALASCHE=:VAALASCHE:,VAAFARBKZ=:VAAFARBKZ:,VAAWEBLEV=:VAAWEBLEV:,VAAARTFAMFL=:VAAARTFAMFL:,VAAARTFAM=:VAAARTFAM:,VAAARTWEB=:VAAARTWEB:,VAAWEBSTD=:VAAWEBSTD:,VAAARTCOL=:VAAARTCOL:,VAAARTFIN=:VAAARTFIN:,VAADIMAM=:VAADIMAM:,VAADIMZAM=:VAADIMZAM:,VAADIMLG=:VAADIMLG:,VAAKONFDES=:VAAKONFDES:,VAAKONFRAP=:VAAKONFRAP:,VAAKONFCOL=:VAAKONFCOL:,VAAKONFLG=:VAAKONFLG:,VAAKONFBRT=:VAAKONFBRT:,VAAKONFMRK=:VAAKONFMRK:,VAABUSIMODE=:VAABUSIMODE:,VAAALTERNAT=:VAAALTERNAT:,VAAARTDESS=:VAAARTDESS:,VAAARTSIZE=:VAAARTSIZE:,VAADIMF1=:VAADIMF1:,VAADIMF2=:VAADIMF2:,VAADIMF3=:VAADIMF3:,VAAFILLER=:VAAFILLER:"
              + " WHERE  VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAART=:VAAART:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void UVAART05(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE VAART SET VAAGESANT1=:VAAGESANT1:,VAAGESANT2=:VAAGESANT2:,VAAGESANT3=:VAAGESANT3:,VAAGESANT4=:VAAGESANT4:,VAAGESANT5=:VAAGESANT5:,VAAGESANT6=:VAAGESANT6:,VAAGESANT7=:VAAGESANT7:,VAAGESANT8=:VAAGESANT8:"
                + " WHERE  VAAMANDANT=:VAAMANDANT: AND VAADART=:VAADART: AND VAADVAR=:VAADVAR:";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void UVAART06(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE VAART SET VAAZOLLTNR1=:VAAZOLLTNR1:,VAAREFART=:VAAREFART:,VAAARTFAM=:VAAARTFAM:,VAAAENDBEN=:VAAAENDBEN:,VAAAENDDAT=:VAAAENDDAT:,VAABEZ=:VAABEZ:,VAAFILLER=:VAAFILLER:,VAAARTWEB=:VAAARTWEB:"
               + " WHERE  VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAART=:VAAART:";

            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        }
        public void UVAERRDAT(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE VAART SET VAASPERRDAT=:VAASPERRDAT:"
               + " WHERE  VAAMANDANT=:VAAMANDANT: AND VAAKOLL=:VAAKOLL: AND VAAART=:VAAART:"; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);
        } 
    }
}
